package holdtime.xlxc.tools.util;

import android.content.Context;

import com.kaopiz.kprogresshud.KProgressHUD;

public class ProgressHUDUtil {

    public KProgressHUD HUD;

    public ProgressHUDUtil(Context context) {
        HUD = KProgressHUD.create(context)
                .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                .setLabel("请稍后")
                .setCancellable(true)
                .setAnimationSpeed(2)
                .setDimAmount(0.5f);
    }

    public void showHUD() {
        HUD.show();
    }

    public void dismissHUD() {
        HUD.dismiss();
    }
}
